#!/usr/bin/env python
# encoding: utf-8
"""
config.py

Created by AlanYang on 2011-06-04.
Copyright (c) 2011 __MyCompanyName__. All rights reserved.
"""

class Config(object):
    #SERVER_NAME = 'freeasker.com application service'

    #mongodb config
    MONGO_HOST = '127.0.0.1'
    MONGO_PORT = 27017

    #redis config
    REDIS_HOST = '222.73.18.67'
    REDIS_PORT = 6379

    #memcache config
    CACHE_MEMCACHED_SERVERS = ['127.0.0.1:11211',]
    CACHE_TYPE = 'memcached'
    CACHE_KEY_PREFIX = 'andsoon'

    #redis question db number
    DB_REDIS_QUESTION = 1
    #redis user db number
    DB_REDIS_USER     = 2
    #redis tags db number
    DB_REDIS_TAG      = 3
    #redis search job db number
    DB_REDIS_SEARCH   = 4

    #default cache user timeout value
    DEFAULT_EXPIRE = 120
    #default cache question timeout value
    QUESTION_EXPIRE = 3600 * 3
    #default cache tag infomation timeout value
    TAG_EXPIRE = 1200

    #cache user data
    CACHED_USER_DATA = True
    #cache question
    CACHED_QUESTION_DATA = True

    SECRET_KEY = 'Alan and ida @2005'
    DEBUG   = False
    TESTING = False
    
    JOBS_KEY   = 'freeasker:search:jobs'

class DevelopmentConfig(Config):
    DEBUG = True
    
class TestingConfig(Config):
    TESTING = True